<?php


class model
{
	var $cache		='';
	var $name		='';
	var $table		='';
	
	function __construct()
	{
		S::loadClass('cache');
		
		$this->cache=new cache();
		$this->setName();
		$this->setTable();
	}
	
	function add($data)
	{
		
	}
	
	function save($data,$options=array())
	{
		
	}
	
	function delete($options)
	{
		
	}
	
	function __call($method,$args)
	{
		
		
	}
	
	function setName()
	{
		if(empty($this->name))
            $this->name =   S::get('__modelName');
        return $this->name;
	}
	
	function setTable()
	{
		$this->cache->tb($this->name);
	}
	
	
}
?>